import { createWebHistory,createRouter } from "vue-router";
const routes=[
  {
    path:"/",
    redirect:"/goods"
  },
  {
    path:"/goods", //商品页
    // redirect:"/goods/detail",
    name:"goods",
    component: ()=>import('../foods/Goods.vue') ,
    children:[
      {
        path:"detail",
        component:()=>import('../foods/Detail.vue')
      }
    ]
  },
  {
    path:"/eva", //评价页
    name:"eva",
    component:()=>import('../foods/Eva.vue')
  },
  {
    path:"/shop", //店铺
    name:"shop",
    component:()=>import('../foods/Shop.vue')
  },
];

const router=createRouter({
  history:createWebHistory(),
  routes,
});

export default router
